/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.sdkj.dspservice.modules.sys.dao;

import com.sdkj.dspservice.common.base.dao.CrudDao;
import com.sdkj.dspservice.modules.sys.entity.Annex;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 附件DAO接口
 * @author tm
 * @version 2020-11-23
 */
public interface AnnexDao extends CrudDao<Annex> {

    /**
     * 根据ids获取附件列表
     * @param ids
     * @return
     */
    @Select( " <script>" +
            " select *,create_by as \"createBy.id\" from sys_annex a where a.delete_flag = '0' and a.id in " +
            " <foreach collection='ids' open='(' item='id' separator=',' close=')'> #{id}</foreach> "+
            " </script>")
    List<Annex> listByIds(String[] ids);

}
